<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="http://www.gome.com.cn/ec/homeus/favicon.ico">
    <title>国美TRP</title>
    <script src="/static/common/semidata/seajs/seajs/2.2.1/sea.js" id="seajsnode"></script>
    <script src="/static/common/semidata/config.js"></script>
    <script src="/static/common/echarts/echarts-plain-map.js"></script>
    <link href="/static/common/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="/static/trp/css/home.css" rel="stylesheet">
    <script>
    	var userId = "{{user.account.id}}", 
    		orgType = "{{user.account.get_organization.type}}", 
   			admin = "{{user.account.is_admin}}", 
   			platform = "{{user.account.is_platform_user}}", 
   			merchant = "{{user.account.is_merchant_user}}",
   			vendor = "{{user.account.is_vendor_user}}";
 	</script>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#"><img src="/static/trp/images/logo.jpg" width="170" height="60"></a>
        </div>
        <div class="navbar-collapse collapse">
            <ul class="nav navbar-nav navbar-right">
                <li><a class="btn-user" href="javascript:;" title="个人信息">{{user.username}}</a></li>
                <li>|</li>
                <li><a class="btn-logout" href="/trp/login/do_logout" title="退出">退出</a></li>
            </ul>
        </div>
    </div>
</div>
<div class="container-fluid">
    <div class="row">
        <div class="sidebar">
            <ul class="nav nav-sidebar">
                <li {% ifequal page "index" %} class="active" {% endifequal %} ><a href="/trp/index/"><i class="icon1"></i>首页</a></li>
                {% if user.account.is_admin %}
                <li {% ifequal page "media" %} class="active" {% endifequal %} ><a href="/trp/media/"><i class="icon2"></i>媒体管理</a></li>
                {% endif %}
                
                <li {% ifequal page "traffic" %} class="active" {% endifequal %} ><a href="/trp/traffic/"><i class="icon6"></i>流量资源</a></li>
                
                {% if not  user.account.is_admin %}
                <li {% ifequal page "strategy" %} class="active" {% endifequal %} ><a href="/trp/strategy/"><i class="icon2"></i>策略管理</a></li>
                {% endif %}

                <li {% ifequal page "material" %} class="active" {% endifequal %} ><a href="/trp/material/"><i class="icon4"></i>素材管理</a></li>

                {% if user.account.is_admin %}
                <li {% ifequal page "organization" %} class="active" {% endifequal %} ><a href="/trp/organization/"><i class="icon3"></i>组织管理</a></li>
                <!-- <li {% ifequal page "user" %} class="active" {% endifequal %} ><a href="/trp/user/"><i class="icon5"></i>用户管理</a></li> -->
                {% endif %}

                {% if user.account.is_vendor_user or user.account.is_merchant_user %}
                    <li {% ifequal page "cost" %} class="active" {% endifequal %} ><a href="/trp/cost/"><i class="icon3"></i>财务管理</a></li>
                {% endif %}
                
                {% if user.account.is_admin %}
                <li {% ifequal page "algorithm" %} class="active" {% endifequal %} ><a href="/trp/algorithm/"><i class="icon8"></i>算法管理</a></li>
                <li {% ifequal page "log" %} class="active" {% endifequal %} ><a href="/trp/operationlog/"><i class="icon7"></i>操作日志</a></li>
                {% endif %}

            </ul>
        </div>
        <div class="main">
{% block content%}
{% endblock%}
        </div>
    </div>
</div>
</body>
</html>
